package com.yu.yupicture.exception;


import lombok.Data;

@Data
public class biusnessException extends RuntimeException {

    private  int code;


    public biusnessException(int code,String message) {
        super(message);
        this.code = code;
    }

    public biusnessException(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public biusnessException(ErrorCode errorCode, String message) {
        super(message);
        this.code = errorCode.getCode();
    }
}
